console.log(".........publicHeader...........");
let publicHeader = new Vue({
    el: "#publicHeaderApp",
    data: {
        bookTypes:[],
        currentAccount:''
    },
    methods: {
        initBookTypes(){
            let _this=this;
            $.get("/booktype/all",function (data) {
                _this.bookTypes=data;
            })
        },
        initCurrentAccount() {
            let _this = this;
            $.get("/user/currentAccount", function (data) {
                _this.currentAccount = data;
                console.log(_this.currentAccount);
            })
        }
    },
    //vue生命周期中调用
    created() {
        this.initBookTypes();
        this.initCurrentAccount();
    }
});
